\documentclass[a4paper,12pt,openright]{book}
\usepackage [pdftex] {graphicx}
\usepackage [utf8]{inputenc}
\usepackage {listings}
\usepackage {amsmath}
\usepackage[final]{pdfpages}
\usepackage{subfig}
\usepackage{amssymb,pepa}

\usepackage{fancyhdr}


\pagestyle{fancy}
% with this we ensure that the chapter and section
% headings are in lowercase.
\fancyhf{} % delete current header and footer
\renewcommand{\chaptermark}[1]{%
        \markboth{#1}{}}
\fancyhead[RO]{\nouppercase{\footnotesize{\rightmark}}\ \ \ \bfseries \thepage}
\fancyhead[LE]{\textbf{\thepage}\ \ \ \footnotesize{\leftmark}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{3pt} % space for the rule
\fancypagestyle{plain}{%
   \fancyhead{} % get rid of headers on plain pages
   \renewcommand{\headrulewidth}{0pt} % and the line
}

\addtolength{\oddsidemargin}{+1.3cm} %inversione destra/sinistra tradizionale
\addtolength{\evensidemargin}{-1.3cm} %inversione destra/sinistra tradizionale

\newtheorem{thm}{Theorem}
\newtheorem{thm2}{Theorem}
\newtheorem{de}[thm]{Definition}
\newtheorem{con}[thm2]{Conclusion}


\begin{document}

\renewcommand{\lstlistingname}{Listing}



\setlength{\baselineskip}{17pt}
\frontmatter
\includepdf{frontespizio}
\include{citazione}
\include{ringraziamenti}
\tableofcontents
\mainmatter
\include{intro}
\include{sharedmemory}
\include{cliserv}
\include{pepa}
\include{tilera}
\include{conclusions}

% Bibliography

\clearpage

\addcontentsline{toc}{chapter}{References}
\nocite{*}
\bibliographystyle{plain}	% (uses file "plain.bst")
\bibliography{biblio}		% expects file "myrefs.bib"

\end{document}